package com.itheima.commonmodule.enums;

public enum Code {
    //状态码
    NOT_FOUND_USER(404, "用户不存在"),
    NOT_FOUND(404, "未找到"),
    FORBIDDEN(403, "禁止访问"),
    UNAUTHORIZED(401, "未授权"),
    FAIL(400, "失败"),
    SUCCESS(200, "成功"),
    ERROR(500, "失败");
    private final int code;
    private final String message;

    // 添加构造函数
    Code(int code, String message) {
        this.code = code;
        this.message = message;
    }

    // 添加getter方法
    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
